@import (reference) "../trade.less";
.trade-chart(
  @content-background-color, @main-font-color, @second-font-color, @border-color
) {
  display: flex;
  flex-direction: column;
  background: @content-background-color;
  transition: all .2s;
  height: calc(100% - @bottom-module-height - @module-margin);
  .trade-chart-title-container {
    padding-left: 10px;
    justify-content: space-between;
    .trade-chart-title-content-container {
      display: flex;
      flex-direction: row;
      align-items: center;
      .trade-chart-title-k-interval-unfold-container {
        display: flex;
      }
      .trade-chart-title-k-interval-select-container {
        display: none;
      }
      .trade-chart-title-k-interval {
        display: inline-block;
        padding: 0 8px;
        font-size: 12px;
        cursor: pointer;
        transition: all .2s;
        &:hover, &[datatype="selected"] {
          color: @main-blue-color;
        }
      }
      .trade-chart-title-split-line {
        display: inline-block;
        height: 14px;
        width: 1px;
        margin-left: 6px;
        margin-right: 6px;
        background-color: @border-color;
      }
      .trade-chart-title-select {
        font-size: 12px;
        height: 34px;
        .trade-chart-title-select-text-container {
          border: none;
          color: @second-font-color;
          .trade-chart-title-select-arrow {
            border-left-width: 4px;
            border-right-width: 4px;
            border-top: 4px solid @second-font-color;
            margin-left: 4px;
          }
        }
        .trade-chart-title-select-drop-down-container {
          width: 80px;
        }
        .trade-chart-title-select-drop-down-row {
          padding: 0 0 0 6px;
          line-height: 26px;
          height: 26px;
          color: @second-font-color;
        }
      }
      .trade-chart-title-select-selected {
        .trade-chart-title-select-text-container {
          color: @main-blue-color;
          .trade-chart-title-select-arrow {
            border-top-color: @main-blue-color;
          }
        }
      }

      .trade-chart-title-icon {
        display: inline-block;
        margin-left: 8px;
        font-size: 16px;
        margin-right: 4px;
        color: @second-font-color;
        transition: all .2s;
        cursor: pointer;
        &:hover {
          color: @main-blue-color;
        }
      }

      .trade-chart-stock-type-btn {
        height: 22px;
        width: 60px;
        margin-right: 10px;
        background: transparent;
        color: @second-font-color;
        font-size: 12px;
        border: solid @border-color 1px;
        border-radius: 2px;
        &:hover {
          color: @main-blue-color;
        }
        &[datatype="selected"] {
          border-color: @main-blue-color;
          color: @main-blue-color;
        }
      }
      .trade-chart-title-icon-theme {
        margin-left: 0;
        margin-right: 10px;
        font-size: 18px;
        transition: all .2s;
      }
    }
  }
}

.trade-chart-night {
  .trade-chart(
    @content-background-color-night,
    @main-font-color-night,
    @second-font-color-night,
    @border-color-night
  )
}

.trade-chart-day {
  .trade-chart(
    @content-background-color-day,
    @main-font-color-day,
    @second-font-color-day,
    @border-color-day
  )
}

@media screen and (max-width: 1650px) {
  .trade-chart-night, .trade-chart-day {
    .trade-chart-title-container {
      .trade-chart-title-content-container {
        .trade-chart-title-k-interval-unfold-container {
          display: none;
        }
        .trade-chart-title-k-interval-select-container {
          display: flex;
        }
      }
    }
  }
}


